package com.changgou.search.controller;

import com.changgou.search.service.SkuService;
import entity.Result;
import entity.StatusCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/*@RestController
@RequestMapping(value = "/search")
@CrossOrigin*/
public class SkuControllerOneself {
//    @Autowired
//    private SkuService skuService;

  /*  *//**
     * 导入数据
     * @return
     *//*
    @GetMapping("/import")
    public Result importEs(){
        skuService.importData();
        return new Result(true, StatusCode.OK,"导入数据到索引库中成功！");
    }

    *//***
     * 查询es的数据
     * @param searchMap
     * @return
     *//*
    @GetMapping                //有可能为空，所以 required = false
    public Map search(@RequestParam(required = false) Map searchMap){
        return skuService.search(searchMap);
    }*/
}
